home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Night Owl 6
/
Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso
/
029a
/
tsbat27.zip
/
C.BAT
< prev
next >
Wrap
DOS Batch File
|
1990-03-14
|
626b
|
30 lines
echo off
echo Lazy changing of directory
echo By Prof. Timo Salmi, ts@chyde.uwasa.fi, 14-Mar-90
echo.
rem If you are fed up with typing \ in changing the directory
rem this is the batch for you
rem E.g. if you have a directory \text\jokes\stupid the just use
rem c text jokes stupid
rem Applying c without parameters takes you to the root directory
:_loop
set tmp_=%tmp_%\%1
shift
if not "%1"=="" goto _loop
if not "%tmp_%"=="\" if not exist %tmp_%\nul goto _error
echo Changing directory to %tmp_%
cd %tmp_%
goto _out
:_error
echo Directory %tmp_% does not exist
:_out
set tmp_=
echo on